import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { LocalStorageService } from '../../local-storage.service';

@Component({
  selector: 'goods-item1',
  templateUrl: './goods-item1.component.html',
  styleUrls: ['./goods-item1.component.css'], 
  inputs: ["item"]
})
export class GoodsItem1Component implements OnInit {
  private lStorage : LocalStorageService=new LocalStorageService();

  item : any = {}
  constructor(private route : Router) {}
  goView(ev) {
    ev.stopPropagation();
    this.lStorage.setObject("info_"+this.item.num_iid,this.item);
    
    this
      .route
      .navigateByUrl("/view/" + this.item.num_iid);
  }
  clearClick(ev){
    ev.stopPropagation();
  }
  ngOnInit() {}

}
